// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IFileRequestPropertyChanged.cs" company="XamlNinja">
//   2011 Richard Griffin and Ollie Riches
// </copyright>
// <summary>
//   IFileRequestPropertyChanged.cs
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace WP7Contrib.Services.DownloadManager
{
    using System;
    using System.ComponentModel;

    /// <summary>
    /// Defines the interface for the notify of file request changes.
    /// </summary>
    public interface IFileRequestPropertyChanged : INotifyPropertyChanged
    {
        /// <summary>
        /// Unique identfier for request.
        /// </summary>
        Guid Identifier { get; }

        /// <summary>
        /// The date the request was created on.
        /// </summary>
        DateTime CreatedOn { get; }

        /// <summary>
        /// The url of the file being downloaded.
        /// </summary>
        string UrlAsString { get; }

        /// <summary>
        /// The local file path, this is where the file when downloaded will be copied too.
        /// </summary>
        string FilePath { get; }

        /// <summary>
        /// The current state of this request.
        /// </summary>
        FileRequestState State { get; }

        /// <summary>
        /// The total time to download the current file length.
        /// </summary>
        TimeSpan Duration { get; }

        /// <summary>
        /// The content length of the file at the Url.
        /// </summary>
        long ContentLength { get; }

        /// <summary>
        /// The local file length.
        /// </summary>
        long FileLength { get; }

        /// <summary>
        /// Defines if this file request is a resumable download.
        /// </summary>
        bool Resumable { get; }

        /// <summary>
        /// The block size used for resumable downloads.
        /// </summary>
        int BlockSize { get; }

        /// <summary>
        /// The exception for the resumable downloads.
        /// </summary>
        Exception Exception { get; }
    }
}